<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="../common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="${path }/js/picture.js"></script>
</head>
<body>
	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
	    <li><a href="#">患者管理</a></li>
	    <li><a href="#">图像管理</a></li>
	    </ul>
	 </div>
	<div class="rightinfo" >
		<ul class="toolbar2" style="float: left;">
       		<li>病历号：<input type="text" id="picture_mrn" value="${chaxun}" style="margin-top:3px;"></li>
    	</ul>
		<ul class="toolbar">
			<li onclick="showPictureInfo()"><span><img src="${path}/images/t04.png" /></span>查询</li>
    	</ul>
	</div>
<!-- 	<div class="line"></div> -->
		<div>
		<ul class="imglist">
			<c:if test="${ !empty pictureBeanList}">
			<c:forEach items="${pictureBeanList }" var="pictureList">
				<li>
					<span><img src="/patPicture/${ pictureList.picture}" style="width:160px;height:120px;" id="p_${pictureList.id }" name="pat_picture" onclick="look_picture('${pictureList.id }')"/></span>
					<h2>日期：${ pictureList.p_dateString}</h2>
					<p title="${ pictureList.memo}"> 描述：<script type="text/javascript">document.write(getSubstr('${ pictureList.memo}',15))</script></p>
					<p><a onclick="messageAlert(4,'你确定要删除的用户吗？',function(){choose_open,del_picture('${pictureList.id}')},1)">删除</a></p>
				</li>
			</c:forEach>
			</c:if>
		</ul>	
		</div>
		
	<div style="margin: 30px 0 0 58px;">
		<div id="localImag"><img id="preview" src="" width="150" height="180" style="display: block; width: 150px; height: 180px;" ></div>
		<input type="file"  id="patPictureFile" name="picture"  style="width:150px;" onchange="javascript:setImagePreview();" accept="image/*">
		<label>图像日期：</label><input type="text" id="p_date_String" name="p_date_String"/>
		<label>描述：</label><textarea  name="memo" id="picture_memo" ></textarea>
		<label onclick="uploadPicture()" class="pmsncontrol" style="display:block; border:solid 1px #D3DBDE; width: 64px;height: 20px; background-color:#F2F6F8;text-align: center;color: #000;">上传</label>
	</div>
	
	<div><input type="text"  value="${realPath }" id="realPath" style="display: none;"/></div>
	<div class="pictureMid" id="pictureMid">
		<img id="mid_picture" style="width: 400px;height: 300px;;position:absolute;" src="" />
		<div id="midend" style="width:400px;height:300px;position:absolute;opacity: 0.1;filter: alpha(opacity = 10);"></div>
		<ul class="mid_ul">
			<li id="p_toLast"><label>上一张</label></li>
			<li id="p_toNext"><label>下一张</label></li>
			<li id="p_toBig"><label>放大</label></li>
			<li id="p_toSmall"><label>缩小</label></li>
			<li id="p_toTurnRight"><label>右旋</label></li>
			<li id="p_toTurnLeft"><label>左旋</label></li>
			<li id="p_toExit"><label>关闭</label></li>
		</ul>
	</div>
	
<script type="text/javascript">
	initPictureDate('${chaxun}');
	if(window.parent.currentUserPmsn == normalLimit){
		pmsnControl();
	}
</script>
</body>
</html>